<template>
  <div>pinia跨组件演示</div>
  <div>
    {{ count }}--{{ doubleCount }}
    <button @click="increment">加</button>
  </div>
</template>
<script setup>
import { ref } from 'vue'
import { useCounterStore } from '@/stores/counter'
import { storeToRefs } from 'pinia'
const { increment } = useCounterStore()

const { count, doubleCount } = storeToRefs(useCounterStore())
</script>

<style scoped></style>
